package com.ftwj.demo.permission.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ftwj.demo.utils.validate.ValidateGroupKey;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
* <p>Title: RoleBean</p>  
* <p>Description: RoleBean对象</p>
* <p>Copyright: Copyright (c) 2020 </p>  
* <p>Company: 兰州飞天网景信息产业有限公司</p>    
* @author WangSLi
* @date 2020年4月8日 下午3:50:20
* @version V1.0
 */
@TableName("tb_role")
@ApiModel(value="RoleBean对象", description="")
public class RoleBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(groups=ValidateGroupKey.class)
    @ApiModelProperty(value = "角色主键")
    @TableId(value = "role_id", type = IdType.AUTO)
    private Integer roleId;

    @NotEmpty
    @TableField(condition="%s LIKE CONCAT('%%',#{%s},'%%') ")
    @ApiModelProperty(value = "角色名称")
    private String roleName;

    @ApiModelProperty(value = "角色标题")
    private String roleTitle;

    @ApiModelProperty(value = "角色描述")
    private String descript;

    @ApiModelProperty(value = "父级角色id")
    private Integer pid;

    @ApiModelProperty(value = "角色创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "角色创建人")
    private Integer createUser;

    @TableLogic
    @ApiModelProperty(value = "角色状态（1.正常，-1.已删除）")
    private Integer state;

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }
    public String getRoleTitle() {
        return roleTitle;
    }

    public void setRoleTitle(String roleTitle) {
        this.roleTitle = roleTitle;
    }
    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }
    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    public Integer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Integer createUser) {
        this.createUser = createUser;
    }
    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "RoleBean{" +
        "roleId=" + roleId +
        ", roleName=" + roleName +
        ", roleTitle=" + roleTitle +
        ", descript=" + descript +
        ", pid=" + pid +
        ", createTime=" + createTime +
        ", createUser=" + createUser +
        ", state=" + state +
        "}";
    }
}
